<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<meta http-equiv="refresh" content="${pageContext.session.maxInactiveInterval}">

<header id="mainHeader">
	<div class="content-wrapper-header">
		<div class="float-left">
			<div id="planeImage">
				<img alt="Company Logo" title="Company Logo"
					src="images/planeStockImg.jpg" />
			</div>
		</div>
		<div id="loggedOut" class="float-right">
			<div id='cssmenu' style='margin-top: 62px'>
				<ul>
					<li class='active has-sub'><a href='#'>Sign In/Register</a>
						<ul>
							<li><a href='Login.jsp'>Sign In</a></li>
							<li><a href='Registration.jsp'>Register</a></li>
						</ul>
					</li>
				</ul>
			</div>
		</div>

		<div id="loggedIn" class="float-right">
			<p style="font-size:15px;  margin:3px">Welcome, <c:out value="${sessionScope.client.user.fullname}"/><p>
			<p style="font-size:15px; margin:0">Organization: <c:out value="${sessionScope.client.organization.name}"/></p>
			<div id='cssmenu' style='margin-top: 4px; width: 200px; float: right'>
				<ul>
					<li class='active has-sub'><a href='#'>My Account</a>
						<ul>
							<c:url value="BookingHistory" var="encodedURLBooking"></c:url> 
							<li><a href='${encodedURLBooking}'>Booking History</a></li>
							<c:url value="ShoppingCart.jsp" var="encodedURLCart"></c:url> 
							<li><a href='${encodedURLCart}'>Shopping Cart</a></li>
							<li><a href='Logout'>Logout</a></li>
						</ul>
					</li>
				</ul>
			</div>
		</div>

		<div class="center-div">
			<p class="site-title">Flight Booking</p>
		</div>
	</div>
</header>

<script type="text/javascript">
	var path = window.location.pathname;
	var page = path.split("/").pop();
	if (page == "Login.jsp" || page == "Login" || page == "Registration.jsp"
			|| page == "Registration") {
		$("div#loggedIn").hide();
	} else {
		$("div#loggedOut").hide();
	}
</script>



